using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Castle.MonoRail.Framework;
using Castle.MonoRail.ActiveRecordSupport;

namespace ElevatorSpeeches.Controllers
{
	public class BaseController : ARSmartDispatcherController
	{
		protected override void Initialize()
		{
			PropertyBag["PageTitle"] = _PageTitle;
			base.Initialize();
		}


		private string _PageTitle = "Elevator Speeches";
		public string PageTitle
		{
			get
			{
				return _PageTitle;
			}
			set
			{
				PropertyBag["PageTitle"] = PageTitle;
				_PageTitle = value;
			}
		}


		public void GoHomeWithMessage(string message)
		{
			Flash["message"] = message;
			Redirect("Home", "index");
		}
	}
}
